home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / contrib / russo / gnuplotio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-25  |  1.1 KB  |  39 lines

  1. /* gnuplotio.h */
  2. #include <stdio.h>
  3.  
  4. #ifndef TRUE
  5. # define TRUE 1
  6. #endif
  7. #ifndef FALSE
  8. # define FALSE 0
  9. #endif
  10.  
  11. typedef struct {
  12.     FILE **ptr;
  13. } GNUPLOT;
  14.  
  15. typedef struct {
  16.     unsigned npts;        /* number of points */
  17.     int is_2d;        /* True: only x,y are valid; z=NULL */
  18.     int curveno;        /* Curve id number */
  19.     float *x;        /* x[npts] */
  20.     float *y;        /* y[npts] */               
  21.     float *z;        /* z[npts] */               
  22.     char *range;        /* range[npts]: 'i' inrange,
  23.                         'o' outrange,
  24.                         'u' undefined */
  25. } GPCurve;
  26.  
  27. extern GNUPLOT *openGnuplot(const char *gnuplotpath);
  28. extern int writeGnuplot(GNUPLOT *gp, const char *command);
  29. extern int readErrorGnuplot(GNUPLOT *gp, char *buf, size_t n);
  30. extern int readGnuplot(GNUPLOT *gp, char *buf, size_t n);
  31. extern GPCurve *readCurveGnuplot(GNUPLOT *gp);
  32. extern int readCurveHeadGnuplot(GNUPLOT *gp, int *curveno, int *npts);
  33. extern int readCurve2Gnuplot(GNUPLOT *gp, char *range, float *x, float *y,
  34.        int npts);
  35. extern int readCurve3Gnuplot(GNUPLOT *gp,char *range,float *x,float *y,
  36.        float *z, int npts);
  37. extern int closeGnuplot(GNUPLOT *gp, int quitflag);
  38.  
  39.